using System;
using System.Collections.Generic;
using System.Reflection;
using System.Runtime.InteropServices;

using ILRuntime.CLR.TypeSystem;
using ILRuntime.CLR.Method;
using ILRuntime.Runtime.Enviorment;
using ILRuntime.Runtime.Intepreter;
using ILRuntime.Runtime.Stack;
using ILRuntime.Reflection;
using ILRuntime.CLR.Utils;
using System.Linq;

namespace ILRuntime.Runtime.Generated
{
    unsafe class huqiang_MoveAnimat_Binding
    {
        public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app)
        {
            BindingFlags flag = BindingFlags.Public | BindingFlags.Instance | BindingFlags.Static | BindingFlags.DeclaredOnly;
            MethodBase method;
            FieldInfo field;
            Type[] args;
            Type type = typeof(huqiang.MoveAnimat);
            args = new Type[]{typeof(System.Single)};
            method = type.GetMethod("Update", flag, null, args, null);
            app.RegisterCLRMethodRedirection(method, Update_0);
            args = new Type[]{};
            method = type.GetMethod("Dispose", flag, null, args, null);
            app.RegisterCLRMethodRedirection(method, Dispose_1);

            field = type.GetField("Target", flag);
            app.RegisterCLRFieldGetter(field, get_Target_0);
            app.RegisterCLRFieldSetter(field, set_Target_0);
            app.RegisterCLRFieldBinding(field, CopyToStack_Target_0, AssignFromStack_Target_0);
            field = type.GetField("StartPosition", flag);
            app.RegisterCLRFieldGetter(field, get_StartPosition_1);
            app.RegisterCLRFieldSetter(field, set_StartPosition_1);
            app.RegisterCLRFieldBinding(field, CopyToStack_StartPosition_1, AssignFromStack_StartPosition_1);
            field = type.GetField("EndPosition", flag);
            app.RegisterCLRFieldGetter(field, get_EndPosition_2);
            app.RegisterCLRFieldSetter(field, set_EndPosition_2);
            app.RegisterCLRFieldBinding(field, CopyToStack_EndPosition_2, AssignFromStack_EndPosition_2);
            field = type.GetField("PlayStart", flag);
            app.RegisterCLRFieldGetter(field, get_PlayStart_3);
            app.RegisterCLRFieldSetter(field, set_PlayStart_3);
            app.RegisterCLRFieldBinding(field, CopyToStack_PlayStart_3, AssignFromStack_PlayStart_3);
            field = type.GetField("PlayOver", flag);
            app.RegisterCLRFieldGetter(field, get_PlayOver_4);
            app.RegisterCLRFieldSetter(field, set_PlayOver_4);
            app.RegisterCLRFieldBinding(field, CopyToStack_PlayOver_4, AssignFromStack_PlayOver_4);


            app.RegisterCLRCreateArrayInstance(type, s => new huqiang.MoveAnimat[s]);

            args = new Type[]{typeof(huqiang.Core.HGUI.UIElement)};
            method = type.GetConstructor(flag, null, args, null);
            app.RegisterCLRMethodRedirection(method, Ctor_0);

        }


        static StackObject* Update_0(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
        {
            ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
            StackObject* ptr_of_this_method;
            StackObject* __ret = ILIntepreter.Minus(__esp, 2);

            ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
            System.Single @timeslice = *(float*)&ptr_of_this_method->Value;

            ptr_of_this_method = ILIntepreter.Minus(__esp, 2);
            huqiang.MoveAnimat instance_of_this_method = (huqiang.MoveAnimat)typeof(huqiang.MoveAnimat).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)0);
            __intp.Free(ptr_of_this_method);

            instance_of_this_method.Update(@timeslice);

            return __ret;
        }

        static StackObject* Dispose_1(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
        {
            ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
            StackObject* ptr_of_this_method;
            StackObject* __ret = ILIntepreter.Minus(__esp, 1);

            ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
            huqiang.MoveAnimat instance_of_this_method = (huqiang.MoveAnimat)typeof(huqiang.MoveAnimat).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)0);
            __intp.Free(ptr_of_this_method);

            instance_of_this_method.Dispose();

            return __ret;
        }


        static object get_Target_0(ref object o)
        {
            return ((huqiang.MoveAnimat)o).Target;
        }

        static StackObject* CopyToStack_Target_0(ref object o, ILIntepreter __intp, StackObject* __ret, IList<object> __mStack)
        {
            var result_of_this_method = ((huqiang.MoveAnimat)o).Target;
            object obj_result_of_this_method = result_of_this_method;
            if(obj_result_of_this_method is CrossBindingAdaptorType)
            {    
                return ILIntepreter.PushObject(__ret, __mStack, ((CrossBindingAdaptorType)obj_result_of_this_method).ILInstance);
            }
            return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method);
        }

        static void set_Target_0(ref object o, object v)
        {
            ((huqiang.MoveAnimat)o).Target = (huqiang.Core.HGUI.UIElement)v;
        }

        static StackObject* AssignFromStack_Target_0(ref object o, ILIntepreter __intp, StackObject* ptr_of_this_method, IList<object> __mStack)
        {
            ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
            huqiang.Core.HGUI.UIElement @Target = (huqiang.Core.HGUI.UIElement)typeof(huqiang.Core.HGUI.UIElement).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)0);
            ((huqiang.MoveAnimat)o).Target = @Target;
            return ptr_of_this_method;
        }

        static object get_StartPosition_1(ref object o)
        {
            return ((huqiang.MoveAnimat)o).StartPosition;
        }

        static StackObject* CopyToStack_StartPosition_1(ref object o, ILIntepreter __intp, StackObject* __ret, IList<object> __mStack)
        {
            var result_of_this_method = ((huqiang.MoveAnimat)o).StartPosition;
            return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method);
        }

        static void set_StartPosition_1(ref object o, object v)
        {
            ((huqiang.MoveAnimat)o).StartPosition = (UnityEngine.Vector3)v;
        }

        static StackObject* AssignFromStack_StartPosition_1(ref object o, ILIntepreter __intp, StackObject* ptr_of_this_method, IList<object> __mStack)
        {
            ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
            UnityEngine.Vector3 @StartPosition = (UnityEngine.Vector3)typeof(UnityEngine.Vector3).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)16);
            ((huqiang.MoveAnimat)o).StartPosition = @StartPosition;
            return ptr_of_this_method;
        }

        static object get_EndPosition_2(ref object o)
        {
            return ((huqiang.MoveAnimat)o).EndPosition;
        }

        static StackObject* CopyToStack_EndPosition_2(ref object o, ILIntepreter __intp, StackObject* __ret, IList<object> __mStack)
        {
            var result_of_this_method = ((huqiang.MoveAnimat)o).EndPosition;
            return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method);
        }

        static void set_EndPosition_2(ref object o, object v)
        {
            ((huqiang.MoveAnimat)o).EndPosition = (UnityEngine.Vector3)v;
        }

        static StackObject* AssignFromStack_EndPosition_2(ref object o, ILIntepreter __intp, StackObject* ptr_of_this_method, IList<object> __mStack)
        {
            ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
            UnityEngine.Vector3 @EndPosition = (UnityEngine.Vector3)typeof(UnityEngine.Vector3).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)16);
            ((huqiang.MoveAnimat)o).EndPosition = @EndPosition;
            return ptr_of_this_method;
        }

        static object get_PlayStart_3(ref object o)
        {
            return ((huqiang.MoveAnimat)o).PlayStart;
        }

        static StackObject* CopyToStack_PlayStart_3(ref object o, ILIntepreter __intp, StackObject* __ret, IList<object> __mStack)
        {
            var result_of_this_method = ((huqiang.MoveAnimat)o).PlayStart;
            return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method);
        }

        static void set_PlayStart_3(ref object o, object v)
        {
            ((huqiang.MoveAnimat)o).PlayStart = (System.Action<huqiang.MoveAnimat>)v;
        }

        static StackObject* AssignFromStack_PlayStart_3(ref object o, ILIntepreter __intp, StackObject* ptr_of_this_method, IList<object> __mStack)
        {
            ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
            System.Action<huqiang.MoveAnimat> @PlayStart = (System.Action<huqiang.MoveAnimat>)typeof(System.Action<huqiang.MoveAnimat>).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)8);
            ((huqiang.MoveAnimat)o).PlayStart = @PlayStart;
            return ptr_of_this_method;
        }

        static object get_PlayOver_4(ref object o)
        {
            return ((huqiang.MoveAnimat)o).PlayOver;
        }

        static StackObject* CopyToStack_PlayOver_4(ref object o, ILIntepreter __intp, StackObject* __ret, IList<object> __mStack)
        {
            var result_of_this_method = ((huqiang.MoveAnimat)o).PlayOver;
            return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method);
        }

        static void set_PlayOver_4(ref object o, object v)
        {
            ((huqiang.MoveAnimat)o).PlayOver = (System.Action<huqiang.MoveAnimat>)v;
        }

        static StackObject* AssignFromStack_PlayOver_4(ref object o, ILIntepreter __intp, StackObject* ptr_of_this_method, IList<object> __mStack)
        {
            ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
            System.Action<huqiang.MoveAnimat> @PlayOver = (System.Action<huqiang.MoveAnimat>)typeof(System.Action<huqiang.MoveAnimat>).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)8);
            ((huqiang.MoveAnimat)o).PlayOver = @PlayOver;
            return ptr_of_this_method;
        }



        static StackObject* Ctor_0(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
        {
            ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
            StackObject* ptr_of_this_method;
            StackObject* __ret = ILIntepreter.Minus(__esp, 1);
            ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
            huqiang.Core.HGUI.UIElement @t = (huqiang.Core.HGUI.UIElement)typeof(huqiang.Core.HGUI.UIElement).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)0);
            __intp.Free(ptr_of_this_method);


            var result_of_this_method = new huqiang.MoveAnimat(@t);

            return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method);
        }


    }
}
